import request from '@/sheep/request';

export function pageList(data) {
	return request({
		url: '/crm/product/page',
		method: 'get',
		data: data
	})
}
// 获取产品信息
export function createProduct(data) {
	return request({
		url: '/crm/product/create',
		method: 'post',
		data: data
	})
}
// 获取产品信息
export function updateProduct(data) {
	return request({
		url: '/crm/product/update',
		method: 'PUT',
		data: data
	})
}
// 获取产品信息
export function getProduct(id) {
	return request({
		url: '/crm/product/get?id=' + id,
		method: 'get'
	})
}
// 删除产品信息
export function deleteProduct(id) {
	return request({
		url: '/crm/product/delete?id=' + id,
		method: 'delete'
	})
}
// 获取分类
export function getCategory(data) {
	return request({
		url: '/crm/product-category/simple-list',
		method: 'get',
		data: data
	})
}
// 获取单位
export function getProductUnit(data) {
	return request({
		url: '/erp/product-unit/simple-list',
		method: 'get',
		data: data
	})
} 